Declare Function GetSystemMetrics Lib "User" (ByVal nIndex As Integer) As Integer
'Declare Function openfile Lib "Kernel" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Integer) As Integer
Declare Sub GetWindowRect Lib "User" (ByVal hWnd As Integer, lpRect As rect)
Declare Sub OffsetRect Lib "User" (lpRect As rect, ByVal x As Integer, ByVal y As Integer)
Declare Sub MoveWindow Lib "User" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal bRepaint As Integer)
Declare Function WinExec Lib "Kernel" (ByVal lpCmdLine As String, ByVal nCmdShow As Integer) As Integer
Global Const SW_SHOW = 5
Sub CenterPopUpWindow (frm As Form)
'CenterPopUpWindow take the window handle and centers the dialog box